import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * https://gitee.com/li--jiaqiang/java-test.git
 * git pull
 * git pull origin master
 * git pull origin master --allow-unrelated-histories
 * User: 86187
 * Date: 2022-04-26
 * Time: 20:13
 */

//Scanner scan = new Scanner(System.in);


public class TestDemo2 {

    /**
     * 判断一个数是不是 2 的 n 次方
     * 是返回true 不是返回false
     * @param n
     * @return
     */
    public static boolean isNum(int n) {
        return (n & (n - 1)) == 0;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(isNum(n));
    }
}
